from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
_magic_number = 2
_modified_time = 1204994452.694
_template_filename='C:\\Projects\\myfirstproject\\myfirstproject\\templates/index.mako'
_template_uri='/index.mako'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding='utf-8'
_exports = ['head_tags']


def _mako_get_namespace(context, name):
    try:
        return context.namespaces[(__name__, name)]
    except KeyError:
        _mako_generate_namespaces(context)
        return context.namespaces[(__name__, name)]
def _mako_generate_namespaces(context):
    # SOURCE LINE 29
    ns = runtime.Namespace('__anon_0x1c49a50', context._clean_inheritance_tokens(), templateuri=None, callables=None, calling_uri=_template_uri, module='myfirstproject.lib.games')
    context.namespaces[(__name__, '__anon_0x1c49a50')] = ns

def _mako_inherit(template, context):
    _mako_generate_namespaces(context)
    return runtime._inherit_from(context, 'base.mako', _template_uri)
def render_body(context,**pageargs):
    context.caller_stack.push_frame()
    try:
        __M_locals = dict(pageargs=pageargs)
        _import_ns = {}
        _mako_get_namespace(context, '__anon_0x1c49a50')._populate(_import_ns, ['Games'])
        h = _import_ns.get('h', context.get('h', UNDEFINED))
        c = _import_ns.get('c', context.get('c', UNDEFINED))
        session = _import_ns.get('session', context.get('session', UNDEFINED))
        # SOURCE LINE 2
        context.write(u'\n\n')
        # SOURCE LINE 7
        context.write(u'\n\n<h1>Hello, welcome to my first project with Pylons!</h1>\n<h2>Put each image to its respective game</h2>\n<div id="message" style="width:1125;margin-bottom:5px;border:1px solid brown;text-align:center">\n\tDrag a image and drop into its respective area\n</div>\n\n<div style="width:1125;display:table">\n\t<div style="float:left">\n\t\n\t\t<div id="warcraft" style="border:1px solid red;width:600;height:295">\n\t\tWarcraft3\n\t\t</div>\n\t\t\n\t\t<div style="margin-top:1px;margin-bottom:1px;height:5;width:600;"></div>\n\n\t\t<div id="diablo2" style="border:1px solid blue;width:600;height:295">\n\t\tDiablo2\n\n\t\t</div>\n\t</div>\n\t')
        # SOURCE LINE 29
        context.write(u'\n\t')
        # SOURCE LINE 30

        
        session['randomImages'] = ';'.join(c.randomImages)
        session.save()
        
        
        # SOURCE LINE 34
        context.write(u'\n\t<div id="right_column" style="margin-left:5px;border:1px solid green;float:right;width:505;height:590;_height:610;padding:5px 5px 5px 5px;">\n')
        # SOURCE LINE 36
        for imageUrl in c.randomImages:
            # SOURCE LINE 37
            context.write(u'\t\t\t    <img src="')
            context.write(unicode(imageUrl))
            context.write(u'" id="image_')
            context.write(unicode(c.randomImages.index(imageUrl)))
            context.write(u'">\n\t\t\t    ')
            # SOURCE LINE 38
            context.write(unicode(h.draggable_element("image_" + str(c.randomImages.index(imageUrl)))))
            context.write(u'\n')
        # SOURCE LINE 40
        context.write(u'\t\n\t</div>\n</div>\n\n')
        # SOURCE LINE 44
        context.write(unicode(h.drop_receiving_element("diablo2", update="message",  url=h.url_for(action="addImageDiablo" ))))
        context.write(u'\n\n')
        # SOURCE LINE 46
        context.write(unicode(h.drop_receiving_element("warcraft",update="message",  url=h.url_for(action="addImageWarcraft" ))))
        context.write(u'\n\n')
        return ''
    finally:
        context.caller_stack.pop_frame()


def render_head_tags(context):
    context.caller_stack.push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, '__anon_0x1c49a50')._populate(_import_ns, ['Games'])
        h = _import_ns.get('h', context.get('h', UNDEFINED))
        # SOURCE LINE 4
        context.write(u'\n    <title>Order the images</title>\n    ')
        # SOURCE LINE 6
        context.write(unicode(h.javascript_include_tag(builtins=True)))
        context.write(u'\n')
        return ''
    finally:
        context.caller_stack.pop_frame()


